package com.zr.inquiry.total.controller;

import com.zr.inquiry.total.model.pojo.LegalPerson;
import com.zr.inquiry.total.service.LegalPersonService;
import com.zr.utils.result.ResultBuilderUtil;
import com.zr.utils.result.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName LegalPersonController
 * @Description TODO
 * @Author Jiakui_Ma
 * @Date 2019/11/10 14:19
 */
@CrossOrigin
@RestController
@RequestMapping("legalPerson")
public class LegalPersonController {

    @Autowired
    private LegalPersonService legalPersonService;

    @GetMapping("ofCurrentUser")
    public ResultUtil queryPage(String _){

        List<LegalPerson> legalPersonList = legalPersonService.queryAll(1);

        return ResultBuilderUtil.success(legalPersonList);
    }
}
